<!DOCTYPE HTML>
<html>
    <head>
        <title>JQuery Plugins - KK Countdown</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <script src="lib/jquery.js" type="text/javascript"></script>
        <script src="js/kkcountdown.js" type="text/javascript"></script>

        <link rel="stylesheet" type="text/css" href="style.css">

        <script type="text/javascript">
            $(document).ready(function(){
                $(".kkcount-down-1").kkcountdown({
                	dayText		: 'day ',
                	daysText 	: 'days ',
                    hoursText	: 'h ',
                    minutesText	: 'm ',
                    secondsText	: 's',
                    displayZeroDays : false,
                    callback	: test,
                    oneDayClass	: 'one-day'
                });
                $(".kkcount-down").kkcountdown({
                	dayText		: ' ',
                	daysText 	: ' ',
                    hoursText	: ':',
                    minutesText	: ':',
                    secondsText	: '',
                    displayZeroDays : false,
                    callback	: function() {
                    	$("odliczanie-a").css({'background-color':'#fff',color:'#333'});
                    },
                    addClass	: ''
                });
                $("#go").click(function() {
                	var secs = $("#secs").val();
                	$("#secs").parent("span").html("<strong>"+secs+"</strong>").addClass('red');
                	$("#go").hide();
	                $(".kkcount-down-2")
	                	.attr('data-seconds', secs)
	                	.kkcountdown({
	                	dayText		: 'd ',
	                	daysText 	: 'dd ',
	                    hoursText	: ':',
	                    minutesText	: ':',
	                    secondsText	: '',
	                    displayZeroDays : false,
	                    textAfterCount: 'BOOM!',
	                    warnSeconds : 10,
	                    warnClass   : 'red',
	                });
                });
            });
            function test(){
            	console.log('KONIEC');
            }
        </script>

    </head>
    <body>
        <div id="content">
            <div id="top">
                <h2>JQuery Plugin - KK Countdown - DEMO</h2>
                <b>author: Krzysztof Furtak</b><br />
                <b>www:</b> <a href="http://krzysztof-furtak.pl">http://krzysztof-furtak.pl</a>
            </div>
            <div id="tytul-a">
                <span>To 11.02.2014 20:00:00</span>
            </div>
            <div id="odliczanie-a">
                <span data-time="1392145200" class="kkcount-down"></span>
            </div>
            <div id="odliczanie-b">To 01.01.2015 00:00 - <b><span data-time="1420066800" class="kkcount-down-1"></span></b></div>
            <div id="odliczanie-c">Start a timer for <span><input type="text" name="secs" id="secs" value="60" style="width:3em;" /></span> seconds from now: <button id="go">Go</button><b><span data-seconds="60" class="kkcount-down-2"></span></b></div>
            <div id="footer">
                Krzysztof Furtak &copy; copyright 2013
            </div>
        </div>
    </body>
</html>
